package com.googlecode.olabs.common.client.contact.formats.json;

import com.googlecode.olabs.common.client.contact.formats.ContactFormat;
import com.googlecode.olabs.common.client.contact.formats.Parser;
import com.googlecode.olabs.common.client.contact.formats.Renderer;

public class JsonFormat implements ContactFormat {

	public static final String KEY_FORMAT = "format";
	public static final String VALUE_FORMAT = "Olabs-Contact-JSON";

	public static final String KEY_VERSION = "version";
	public static final String VALUE_VERSION = "1.0";

	public static final String KEY_ID = "id";
	public static final String KEY_FIELDS = "fields";

	public static final String KEY_FIELD_TYPE = "type";
	public static final String KEY_FIELD_SUBTYPE = "subTypes";
	public static final String KEY_FIELD_VALUE = "value";

	private Parser m_parser;

	public JsonFormat(Parser parser) {
		m_parser = parser;
	}

	public Parser getParser() {
		return m_parser;
	}

	public Renderer getRenderer() {
		return new JsonRenderer();
	}

}
